package com.jiuwu.spring.eshop.respository;

import com.jiuwu.spring.eshop.db.entity.BBS;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface BBSRepository extends BaseRepository<BBS,Integer>{

    /**
     * 获取最新的 5 条 BBS 记录
     * @return BBS 记录
     */
    List<BBS> findTop5ByOrderByUpdateTimeDesc();


    List<BBS> findAllByOrderByUpdateTimeDesc();

    Page<BBS> findAll(Pageable pageable);
}
